<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="./css/ui.jqgrid.css" rel="stylesheet" type="text/css"></link>
<link href="./css/redmond/jquery-ui-1.8.14.custom.css" rel="stylesheet"
	type="text/css"></link>
<script src="scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
<script src="scripts/jqgrid/i18n/grid.locale-cn.js"
	type="text/javascript"></script>
<script src="scripts/jqgrid/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="scripts/jquery-ui-1.8.14.min.js" type="text/javascript"></script>
<script src="scripts/jqgrid/ui.multiselect.js" type="text/javascript"></script>
<script type="text/javascript">
	$.jgrid.no_legacy_api = true;
	$.jgrid.useJSON = true;
	$.jgrid.defaults = $.extend($.jgrid.defaults, {
		loadui : "enable"
	});
</script>
</head>
<body>
	<table id="list2"></table>
	<div id="pager2"></div>
	<script type="text/javascript">
		jQuery("#list2").jqGrid(
				{
					url : 'user.do?method=getUsers',
					datatype : "json",
					colNames : [ 'ID', '用户名', '密码', '所属角色', '创建人',
							'创建时间' ],
					colModel : [ {
						name : 'id',
						index : 'id',
						width : 55
					}, {
						name : 'userName',
						index : 'userName',
						width : 90
					}, {
						name : 'password',
						index : 'password',
						width : 100
					}, {
						name : 'roleId',
						index : 'roleId',
						width : 80,
						align : "right"
					}, {
						name : 'createUserName',
						index : 'createUserName',
						width : 80
					}, {
						name : 'createDate',
						index : 'createDate',
						width : 80
					}],
					rowNum : 20,
					rowList : [ 10, 20, 30 ],
					pager : '#pager2',
					sortname : 'id',
					viewrecords : true,
					sortorder : "desc"
				});
		jQuery("#list2").jqGrid('navGrid', '#pager2', {
			edit : false,
			add : false,
			del : false
		});
	</script>
</body>
</html>